Skip to content

execution results index#355

Merged
miiu96 merged 14 commits intorc/supernovafrom
execution-results-index
Nov 21, 2025
Merged

execution results index#355
miiu96 merged 14 commits intorc/supernovafrom
execution-results-index

Conversation

@miiu96
Copy link
Copy Markdown
Contributor

@miiu96 miiu96 commented Nov 6, 2025

@miiu96 miiu96 self-assigned this Nov 11, 2025
}
}

for _, executionResult := range obh.Header.GetExecutionResultsHandlers() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need to check if header v3 here?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, if is HeaderV1 or HeaverV2 it will return nil and will not go in the for loop

Comment on lines +201 to +202
executionResult.AccumulatedFees = t.AccumulatedFees.String()
executionResult.DeveloperFees = t.DeveloperFees.String()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need these for shard exec result?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because also on the shard block are indexed

Round: obh.Header.GetRound(),
ShardID: obh.Header.GetShardID(),
Epoch: obh.Header.GetEpoch(),
MiniBlockHeaders: obh.Header.GetMiniBlockHeaderHandlers(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so here we index proposed miniblocks? and below we index executed miniblocks, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly

)
}

// RemoveMiniblocks will remove all miniblocks that are in header from elasticsearch server
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the flow on remove updated also for miniblocks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is GetMiniblocksHashesHexEncoded properly updated to fetch miniblocks from execution results?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactored this method

Comment on lines 333 to +343
func (ei *elasticProcessor) RemoveTransactions(header coreData.HeaderHandler, body *block.Body, timestampMs uint64) error {
encodedTxsHashes, encodedScrsHashes := ei.transactionsProc.GetHexEncodedHashesForRemove(header, body)
headerData := &data.HeaderData{
Timestamp: header.GetTimeStamp(),
TimestampMs: timestampMs,
Round: header.GetRound(),
ShardID: header.GetShardID(),
Epoch: header.GetEpoch(),
MiniBlockHeaders: header.GetMiniBlockHeaderHandlers(),
}
encodedTxsHashes, encodedScrsHashes := ei.transactionsProc.GetHexEncodedHashesForRemove(headerData, body)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have to remove also the txs from execution results?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starting with header v3 we should not have rollbacks.

}
}

for _, executionResult := range obh.Header.GetExecutionResultsHandlers() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@miiu96 miiu96 merged commit 7a403d4 into rc/supernova Nov 21, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants